package com.shop.cereshop.commons.domain.product;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cere_product_visit")
@ApiModel(value = "CereProductVisit对象", description = "商品访问记录表")
public class CereProductVisit implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "关联商品id", required = true)
    @TableField("product_id")
    private Long productId;

    @ApiModelProperty(value = "关联客户id", required = true)
    @TableField("buyer_user_id")
    private Long buyerUserId;

    @ApiModelProperty(value = "访问时间", required = true)
    @TableField("visit_time")
    private LocalDateTime visitTime;

    @ApiModelProperty(value = "访问终端 1-APP 2-小程序 3-PC端")
    @TableField("terminal")
    private Integer terminal;

    @ApiModelProperty(value = "操作系统 1-Android 2-IOS 3-浏览器")
    @TableField("system")
    private Integer system;

    @ApiModelProperty(value = "所在地区")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

}
